home *** CD-ROM | disk | FTP | other *** search
Wrap
/* ** $VER: EdgeMerge 1.31, IE Arexx script ** Image Engineer Macro script ** Copyright © by Patrik M Nydensten ** 15/1 1997 Stockholm/Sweden ** ** MS: Alphapicture now use zoomvalue of original picture ** ** Merge image's top and left edges with bottom and right edges ** to form a seemless pattern image. */ Options results Signal On Error NL = x2c(0a); SQ = x2c(27) if arg()==0 then exit pic=arg(1) PROJECT_INFO pic WIDTH IW=result PROJECT_INFO pic HEIGHT IH=result PROJECT_INFO pic ZOOM origzoomval=result 'FORM "Edge Merge" "Ok|Cancel"', ' TEXT,"Blends the image'SQ's edges to form a tileable image"', ' INTEGER,"X Amount",1,'trunc(IW/2)','trunc(IW/4)',SLIDER', ' INTEGER,"Y Amount",1,'trunc(IH/2)','trunc(IH/4)',SLIDER' parse var result ok Xmerge Ymerge if ok = 0 then exit /* Start the action */ 'OPEN' '"IE:Alpha/Gradient.alpha"' '8' LoadAlphaImage = Result PROJECT_SET loadalphaimage ZOOM origzoomval /* bottom */ 'ROTATE' LoadAlphaImage 270 'BEST' RotAlphaImage = Result 'SCALE' RotAlphaImage IW Ymerge 'BEST' AlphaImage = Result 'CLOSE' RotAlphaImage 'MARK' AlphaImage 'ALPHA' 'MARK' pic 'PRIMARY' 'MARK' pic 'SECONDARY' 'COMPOSITE' 0 IH-Ymerge 'ALPHA' Newback = Result 'CLOSE' AlphaImage /* right */ 'REFLECT_X' LoadAlphaImage RotAlphaImage = Result 'CLOSE' LoadAlphaImage 'SCALE' RotAlphaImage Xmerge IH 'BEST' AlphaImage = Result 'CLOSE' RotAlphaImage 'MARK' AlphaImage 'ALPHA' 'MARK' Newback 'PRIMARY' 'MARK' Newback 'SECONDARY' 'COMPOSITE' IW-Xmerge 0 'ALPHA' Newback1 = Result 'CLOSE' Newback 'CLOSE' AlphaImage 'CROP' NewBack1 Xmerge-1 Ymerge-1 IW-2 IH-2 final=result PROJECT_SET final ZOOM origzoomval 'CLOSE' NewBack1 exit /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' ' OK ' exit end